#include "thread.hpp"

void Log()
{
    std::cout << "我是一个日志记录任务" << std::endl;
}

void Flush()
{
    std::cout << "我是一个刷新任务" << std::endl;
}

void Print()
{
    std::cout << "我是一个打印任务" << std::endl;
}


int main()
{
    std::vector<wnf::func> ways = {Log,Flush,Print};
    wnf::Thread t1(ways[0]),t2(ways[1]),t3(ways[2]);
    
    t1.Create();
    t2.Create();
    t3.Create();

    // t1.Stop();
    // t2.Stop();
    // t3.Stop();

    t1.Join();
    t2.Join();
    t3.Join();
    // sleep(10);
    // t1.Detach();
    // t2.Detach();
    // t3.Detach();
    // sleep(3);
    return 0;
}